<?php 
session_start(); 
require_once('include/connect.inc.php'); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Model Test Program</title>
<link rel="stylesheet" type="text/css" href="template/template_style_wood.css">
</head>

<body>
<div id="menu"><div><img src="../images/icon-m.png" /></div>
<div id="menulinks">
		<a  href="index.php">หน้าหลัก</a>
		<a  class="active" href="login.php">เข้าสู่ระบบ</a>
		</div></div>
 <div id="p3">    
<div id="header"></div>
<div id="page"><div id="p1">
<script language="javascript">
		function fncSubmit()
		{
			if(document.form1.txtusername.value == ""){
				alert('กรุณากรอกรหัสประจำตัว');
				document.form1.txtusername.focus();       
				return false;
			}  
			if(document.form1.txtpassword.value==""){
				alert('กรุณากรอกรหัสผ่าน');
				document.form1.txtpassword.focus();
				return false;
			}
			document.form1.submit();
	}
</script>
<form name="form1" method="post" action="check_login.php" onSubmit="JavaScript:return fncSubmit();">
<table background="../images/login-w.png" width="300" height="300" id="p2">
    <tr>
    <td valign="top">
    	<div align="center"><font size="+2">ลงชื่อเข้าใช้</font></div>
        	</br><div>รหัสประจำตัว</div>
            <div><input type="text" name="txtusername" id="txtusername" size="30" /></div>
            <div>รหัสผ่าน</div>
             <div><input type="password" name="txtpassword" id="txtpassword" size="30" /></div>
            <div>ตรวจสอบ</div>
             <div><input type="text" name="code" size="10" /> <img src="captcha/verify-image-bg.php" align="absmiddle" /></div>
             <div align="center"><input type="submit" name="Login" id="Login" value="ลงชื่อเข้าใช้" /><input type="reset" name="reset" id="reset" value="ยกเลิก" /></div>
    </td>
    </tr>
    </table>
          </form>
    </div>
    </div>
<div id="footer"></div>
</div>
</body>
</html>

